package com.hucais.etl.history.controller

import com.hucais.core.utils.{DefaultPropertiesUtil, SparkDefaultUtil}
import com.hucais.etl.history.service.HistoryKfzService

/**
 * 历史的孔夫子爬虫数据清洗
 */
object HistoryKfzController {

  def main(args: Array[String]): Unit = {
    // 获取SparkSession
    val sparkSession = SparkDefaultUtil.getSession(isLocal = false, this.getClass.getSimpleName, withEs = true, withHive = true)

    val ssc = sparkSession.sparkContext
    ssc.hadoopConfiguration.set("fs.defaultFS", DefaultPropertiesUtil.get("fs.defaultFS"))
    HistoryKfzService.action(ssc, sparkSession)
  }
}
